Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement seeking to the end of the content in a MemProducer #73

Merged
merged 2 commits into from
Aug 25, 2015

Conversation

ngrewe
Copy link
Contributor

@ngrewe ngrewe commented Aug 24, 2015

Hi!

I'm currently building a parser for the old Apple/OpenStep binary property list format and that needs to seek to the end of the archive to find some bookkeeping information. To make it easier for testing, I've implemented support for SeekFrom::End in the MemProducer.

Please have a look whether this makes sense to you. Thanks!

@Geal
Copy link
Collaborator

Geal commented Aug 24, 2015

Looks good to me. Could you add unit tests? With one testing the underflow. To make sure I won't introduce regressions :)

@ngrewe
Copy link
Contributor Author

ngrewe commented Aug 25, 2015

No problem :). I've added tests for seeking backwards within the buffer and beyond start and end

Geal added a commit that referenced this pull request Aug 25, 2015
Implement seeking to the end of the content in a MemProducer
@Geal Geal merged commit f428070 into rust-bakery:master Aug 25, 2015
@Geal
Copy link
Collaborator

Geal commented Aug 25, 2015

great, thanks! By the way, may I ask which format are you parsing with nom? Please notify me on #14 when it is done :)

ArtemGr referenced this pull request Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants